// created: 2019/7/5
// owner: flwwsg@qq.com
// desc: test mysql code
package main

import (
	"fmt"

	error2 "gitee.com/flwwsg/utils-go/error"
	"gitee.com/flwwsg/utils-go/mysql"
)

func main() {
	dbName := "team_place"
	config := new(mysql.Config)
	config.Debug = true
	config.Password = "123456"
	config.Port = 3306
	config.Username = "dev"
	config.Host = "192.168.112.130"
	repo := mysql.NewRepo(config)
	db, err := repo.GetDB(&mysql.DB{Name: dbName})
	error2.PanicOnErr(err)
	fmt.Printf("%v\n", db)
}
